import { Product, Category, AdminUser, Role, Permission } from '../types';

export const mockCategories: Category[] = [
  { id: '1', name: '手机数码', icon: '📱' },
  { id: '2', name: '服装鞋包', icon: '👕' },
  { id: '3', name: '家居生活', icon: '🏠' },
  { id: '4', name: '美妆护肤', icon: '💄' },
  { id: '5', name: '食品生鲜', icon: '🍎' },
  { id: '6', name: '运动户外', icon: '⚽' },
];

export const mockProducts: Product[] = [
  {
    id: '1',
    name: 'iPhone 15 Pro',
    description: '苹果最新旗舰手机，搭载A17 Pro芯片，支持5G网络',
    price: 7999,
    originalPrice: 8999,
    image: 'https://via.placeholder.com/300x300?text=iPhone+15+Pro',
    images: ['https://via.placeholder.com/300x300?text=iPhone+15+Pro'],
    categoryId: '1',
    stock: 50,
    sales: 1200,
    isHot: true,
    createdAt: '2024-01-01T00:00:00Z',
  },
  {
    id: '2',
    name: '小米14',
    description: '小米14旗舰手机，徕卡影像，澎湃OS',
    price: 3999,
    originalPrice: 4299,
    image: 'https://via.placeholder.com/300x300?text=小米14',
    images: ['https://via.placeholder.com/300x300?text=小米14'],
    categoryId: '1',
    stock: 80,
    sales: 800,
    isHot: true,
    createdAt: '2024-01-02T00:00:00Z',
  },
  {
    id: '3',
    name: '华为Mate 60 Pro',
    description: '华为旗舰手机，麒麟9000S芯片，支持卫星通话',
    price: 6999,
    image: 'https://via.placeholder.com/300x300?text=华为Mate60',
    images: ['https://via.placeholder.com/300x300?text=华为Mate60'],
    categoryId: '1',
    stock: 30,
    sales: 600,
    isHot: true,
    createdAt: '2024-01-03T00:00:00Z',
  },
  {
    id: '4',
    name: '优衣库基础T恤',
    description: '100%纯棉，舒适透气，多色可选',
    price: 99,
    originalPrice: 129,
    image: 'https://via.placeholder.com/300x300?text=优衣库T恤',
    images: ['https://via.placeholder.com/300x300?text=优衣库T恤'],
    categoryId: '2',
    stock: 200,
    sales: 500,
    isHot: false,
    createdAt: '2024-01-04T00:00:00Z',
  },
  {
    id: '5',
    name: 'Nike Air Force 1',
    description: '经典小白鞋，百搭时尚，舒适耐穿',
    price: 899,
    image: 'https://via.placeholder.com/300x300?text=Nike+AF1',
    images: ['https://via.placeholder.com/300x300?text=Nike+AF1'],
    categoryId: '2',
    stock: 150,
    sales: 300,
    isHot: true,
    createdAt: '2024-01-05T00:00:00Z',
  },
  {
    id: '6',
    name: '无印良品床上四件套',
    description: '纯棉材质，简约设计，舒适亲肤',
    price: 299,
    originalPrice: 399,
    image: 'https://via.placeholder.com/300x300?text=床上用品',
    images: ['https://via.placeholder.com/300x300?text=床上用品'],
    categoryId: '3',
    stock: 100,
    sales: 250,
    isHot: false,
    createdAt: '2024-01-06T00:00:00Z',
  },
];

export const mockAdminUsers: AdminUser[] = [
  {
    id: '1',
    username: 'admin',
    email: 'admin@mall.com',
    role: 'admin',
    roleId: '1', // 超级管理员
  },
  {
    id: '2',
    username: 'product',
    email: 'product@mall.com',
    role: 'admin',
    roleId: '2', // 商品管理员
  },
  {
    id: '3',
    username: 'order',
    email: 'order@mall.com',
    role: 'admin',
    roleId: '3', // 订单管理员
  },
];

export const mockRoles: Role[] = [
  {
    id: '1',
    name: '超级管理员',
    permissions: ['dashboard', 'product', 'category', 'order', 'role'],
  },
  {
    id: '2',
    name: '商品管理员',
    permissions: ['dashboard', 'product', 'category'],
  },
  {
    id: '3',
    name: '订单管理员',
    permissions: ['dashboard', 'order'],
  },
];
